package com.xt.base.model.dictionary;


/**
 * 功能字典 <br>
 * 
 * <p>
 * <a href="Function.java.html"><i>查看源文件</i></a>
 * </p>
 * 
 * @author 杨洪波
 * @version $Revision: $<br>
 *          $Id: $
 * @hibernate.subclass name="Function" discriminator-value="Function"
 */
public class Function extends BaseDictionary{

	private static final long serialVersionUID = -761045588047168792L;
	/** 应用分类 */
	private ApplicationType appType;

	/** 功能字典 */
	private FunctionGroup functionGroup;

	/** 描述 */
	private String description;

	/** 加权指数标志 按二进制的位表示 */
	private long mark;

	/** URL */
	private String url;

	/** 显示顺序 */
	private Integer displayOrder = 1;

	/** 图标名称 */
	private String imageName;
	
	public Function(){
		super();
	}
	
	public Function(String name){
		super(name);
	}
	
	public Function(String name,String nationalCode){
		super(name,nationalCode);
	}
	
	public Function(String name,String nationalCode,FunctionGroup functionGroup,
				String description,Long mark,String url,Integer displayOrder,
				String imageName,Function catalog,ApplicationType appType){
		super(name,nationalCode);
		this.functionGroup = functionGroup;
		this.description = description;
		this.mark = mark;
		this.url = url;
		this.displayOrder = displayOrder;
		this.imageName = imageName;	
		this.superior = catalog;
		this.appType = appType;
	}

	public int compareTo(Object o) {
		if(o == null)return 0;
		return this.getDisplayOrder()-((Function)o).getDisplayOrder();
	}
	
	/**
	 * @hibernate.property column="Description"
	 * @return 描述
	 */
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @hibernate.property column="DisplayOrder"
	 * @return 显示顺序
	 */
	public int getDisplayOrder() {
		return displayOrder;
	}

	public void setDisplayOrder(int displayOrder) {
		this.displayOrder = displayOrder;
	}

	/**
	 * @hibernate.many-to-one column = "FunctionGroup_ID"
	 * @return 功能分组
	 */
	public FunctionGroup getFunctionGroup() {
		return functionGroup;
	}

	public void setFunctionGroup(FunctionGroup functionGroup) {
		this.functionGroup = functionGroup;
	}

	/**
	 * @hibernate.property column="ImageName" not-null="false" unique="false"
	 * @return 图标名称
	 */
	public String getImageName() {
		return imageName;
	}

	public void setImageName(String imageName) {
		this.imageName = imageName;
	}

	/**
	 * @hibernate.property column="Mark" not-null="false" unique="false"
	 * @return 加权指数标志
	 */
	public long getMark() {
		return mark;
	}

	public void setMark(long mark) {
		this.mark = mark;
	}

	/**
	 * @hibernate.property column="Url" not-null="false" unique="false"
	 * @return url
	 */
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @hibernate.many-to-one column = "ApplicationType_ID" lazy="true"
	 * @return 应用分类
	 */
	public ApplicationType getAppType() {
		return appType;
	}

	public void setAppType(ApplicationType appType) {
		this.appType = appType;
	}

}
